<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="com/jquery.js"></script>
</head>
<body>
<div id="example-3">
    <button> Say Hi</button>
    <button> Say What</button>
</div>
<script>
    $(function () {
        $("#example-3 button").click(function () {
            var href = $(this).index();
            if (href == 0) {
                alert("你单击了第一个按钮")
            }
            if (href == 1) {
                alert("你单击了第二个按钮")
            }
        })
    })
</script>
</body>
</html>